import { getRequest, postRequest, putRequest, deleteRequest } from '@/utils/request';
/**
 * 设备保养项目配置*/
// 创建
export const workforceManagementUpkeepMachineItemCreate = (data) => postRequest('/workforcemanagement/upkeep-machine-item/create', data);
export const machineManagerUpkeepMachineJobUpdateUpkeepJobMachine = (data) => postRequest('/machinemanager/upkeep-machine-job/update-upkeep-job-machine', data);
// 删除
export const workforceManagementUpkeepMachineItemDelete = (params) => deleteRequest('/workforcemanagement/upkeep-machine-item/delete', params);

// 获得
export const workforceManagementUpkeepMachineItemGet = (params) => getRequest('/workforcemanagement/upkeep-machine-item/get', params);

// 分页-项目的角度
export const workforceManagementUpkeepMachineItemPage = (params) => getRequest('/workforcemanagement/upkeep-machine-item/page', params);
// 分页-设备的角度
export const workforceManagementUpkeepMachineItemMachinePage = (params) => getRequest('/workforcemanagement/upkeep-machine-item/machine-page', params);
export const workforceManagementUpkeepMachineItemHistoryPage = (params) => getRequest('/workforcemanagement/upkeep-machine-item/history-page', params);
export const workforceManagementUpkeepMachineItemUpdate = (data) => putRequest('/workforcemanagement/upkeep-machine-item/update', data);
export const workforceManagementUpkeepMachineItemUpdateAuditState = (data) => postRequest('/workforcemanagement/upkeep-machine-item/update-audit-state', data);

export const workforceManagementUpkeepMachineItemCount = (params) => getRequest('/workforcemanagement/upkeep-machine-item/count', params);
export const workforceManagementUpkeepMachineItemWeeksCount = (params) => getRequest('/workforcemanagement/upkeep-machine-item/weeks-count', params);
// 接单
export const workforceManagementUpkeepMachineItemTaking = (data) => postRequest('/workforcemanagement/upkeep-machine-item/taking', data);
export const workforceManagementUpkeepMachineItemClearTaking = (data) => postRequest('/workforcemanagement/upkeep-machine-item/clear-taking', data);

// 维修状态及条数
export const workforceManagementUpkeepMachineItemGetStateCount = (params) => getRequest('/workforcemanagement/upkeep-machine-item/get-state-count', params);

// 完成维修
export const workforceManagementUpkeepMachineItemComplete = (data) => postRequest('/workforcemanagement/upkeep-machine-item/complete', data);
export const workforceManagementUpkeepMachineItemClearComplete = (data) => postRequest('/workforcemanagement/upkeep-machine-item/clear-complete', data);

export const machineManagerUpkeepMachineJobUpdateMachineAndItem = (data) => postRequest('/machinemanager/upkeep-machine-job/update-machine-and-item', data);
export const machineManagerUpkeepMachineJobBatchTaking = (data) => postRequest('/machinemanager/upkeep-machine-job/batch-taking', data);
export const machineManagerUpkeepMachineJobMachineDetails = (data) => postRequest('/machinemanager/upkeep-machine-job/machine-details', data);
